// xc/components/pro/evaluate.js
const app = getApp()

Component({
  options: {
    addGlobalClass: true,
    multipleSlots: true
  },
  /**
   * 组件的属性列表
   */
  properties: {
    
    xcmodel: {
      type: Object,
      default: {}
    },
    customStyle:String,
    textColor:String,
    starColor:String,
    timeColor:String,
    nameColor:String,
  },

  /**
   * 组件的初始数据
   */
  data: {
    basicurl: -1
    // item:{
    //   headimgurl:"https://cx002ex.7mx7.com/addons/xc_card/resource/images/headimg.png",
    //   nickname:"小丸子",
    //   stars:"2.5",
    //   createtime:"2020-03-25",
    //   contents:"这家芒果水分多，打开箱子就能闻到芒果香味吃起来感觉味道好，而且价格低质量好皮上...",
    //   imgs:[
    //     {url:"https://cx002ex.7mx7.com/addons/xc_card/resource/images/headimg.png"}
    //   ]
    // }
  },
  ready(){
    
   
  },
  /**
   * 组件的方法列表
   */
  methods: {
    setbasicurl(){
      var that=this;
      var app = getApp()
     
      var basicurl=app.globalData["xcsys"]['basicurl']+'/addons/'+app.globalData["xcsys"]['m']+'/';
      that.setData({basicurl:basicurl})
      app.globalData.basicurl=basicurl;
     
    },
    preview(event) {
      
       var dataset=event.currentTarget.dataset
     
      
    
      let currentUrl =  dataset.imglist[  dataset.idx]
      wx.previewImage({
        current: currentUrl, // 当前显示图片的http链接
        urls:  dataset.imglist // 需要预览的图片http链接列表
      })
    }
  }
})
